﻿using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using RBE.Common;
using System.Collections.Generic;
using Cureos.Measures;
using Cureos.Measures.Quantities;

namespace RBE.CommonTests {
    [TestClass]
    public class HighLevelTests {

        [TestMethod]
        public void CreateResource() {
            var electricity = new ResourceTemplate() {
                Id = Guid.NewGuid(),
                Name = "Electricity",
                Version = 201211210000ul,
            };
            var iron = new ResourceTemplate() {
                Id = Guid.NewGuid(),
                Name = "Iron",
                Version = 201211210000ul,
            };
            var ironKettle = new ResourceTemplate() {
                Id = Guid.NewGuid(),
                Name = "Iron Kettle",
                Version = 201211210000ul,
                Resources = {
                    new Resource(electricity) { Measurement = { new Measure<Energy>(0.000345, Energy.KiloWattHour) }},
                    new Resource(iron) { Measurement = { new Measure<Mass>(1.5, Mass.KiloGram) }},
                },
            };

            var anIronKettle = new Resource(ironKettle) {
                SerialNumber = 1ul,
            };
        }

    }
}
